package java8_31.teat_2;

public class Computer {
    private String brand;
    private int price;
    private Cpu cpu;
    private Ems ems;
    private HardDisk hardDisk;

   /* public Computer(String brand, int price, Cpu cpu, Ems ems, HardDisk hardDisk) {
        this.brand = brand;
        this.price = price;
        this.cpu = cpu;
        this.ems = ems;
        this.hardDisk = hardDisk;
    }*/

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public Cpu getCpu() {
        return cpu;
    }

    public void setCpu(Cpu cpu) {
        this.cpu = cpu;
    }

    public Ems getEms() {
        return ems;
    }

    public void setEms(Ems ems) {
        this.ems = ems;
    }

    public HardDisk getHardDisk() {
        return hardDisk;
    }

    public void setHardDisk(HardDisk hardDisk) {
        this.hardDisk = hardDisk;
    }

  public void show(){
      System.out.println("计算机的信息如下：");
      System.out.println("价格"+price+"的"+brand);
      System.out.println("cpu的品牌是"+getCpu().cpuBrand()+"cpu的主频是"+getCpu().cpuBasicFrequency()+"GHz");
      System.out.println("硬盘的种类是"+getEms().type()+"硬盘的容量是"+getEms().capacity()+"G");
      System.out.println("内存的容量是"+getHardDisk().capacity()+"G");
  }
}
